package org.lanqiao.tjut.test.factory;

import org.lanqiao.tjut.outputer.IOutputer;
import org.lanqiao.tjut.outputerImpl.Outputer4CsvImpl;

public class OutputerFactory {

	/**
	 * 获取Outputer4CsvImpl实例工厂
	 * 
	 * @return Outputer4CsvImpl 实例
	 */
	public static Outputer4CsvImpl getOutputer4CsvImplNewInstance() {
		return new Outputer4CsvImpl();
	}

	/**
	 * 获取传入类的实例工厂
	 * 
	 * @return 传入类的实例
	 */
	public static IOutputer getNewInstance(Class clazz) {
		IOutputer iop = null;
		try {
			iop = (IOutputer) clazz.newInstance();
		} catch (InstantiationException | IllegalAccessException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return iop;
	}
}
